﻿//
//  Panel1
//
//  Created by Andy Hatch on 2008-06-30.
//

import com.ahatch.SimplePRVid;
import mx.utils.Delegate;
import PointRollAPI.PointRoll;

class com.companyName.Panel1
{

	private var _view:MovieClip;
	private var _me;
	private var _audio:Boolean
	private var _prControl:PointRoll;
	
	function Panel1(view:MovieClip)
	{
		_view = view;
		_me = this;
		
		initialize();
	}
	
	private function initialize():Void
	{
		trace("Panel1 :: initialize()");
		_prControl = new PointRoll(_view);
		_prControl.pin();
		
		_audio = true;		
	}
	
	/*
	*
PUBLIC METHODS
	*
	*/
	
	//
	
	
	/*
	*
PRIVATE METHODS
	*
	*/	
	
	
	private function linkExternal():Void
	{
		_prControl.launchURL("http://www.example.com/");
	}
	
	private function closePanel():Void
	{
		trace("Panel1 :: closePanel()");
		_prControl.close();
	}
	
	private function muteAudio():Void
	{
		_audio = false;
	}
	
	private function unmuteAudio():Void
	{
		_audio = true;
	}
	
	
	/*
	*
HANDLERS
	*
	*/
	
	private function onMuteBtnRelease():Void
	{
		trace("Panel1 :: onMuteBtnRelease()");
		switch(_audio)
		{
			case true :
				muteAudio();
				break
			case false :
				unmuteAudio();
				break;
		}
	}
	
	
}